#ifndef ELK_DOM_VISITOR_H
#define ELK_DOM_VISITOR_H

#include "elk_web_delegate.h"
#include "include/cef_client.h"

class ElkDomLinksVisitor : public CefDOMVisitor
{
public:
    ElkDomLinksVisitor(const QString frame, ElkWebDelegate *delegate);
    ~ElkDomLinksVisitor();

    virtual void Visit(CefRefPtr<CefDOMDocument> document) OVERRIDE;

private:
    QString frame_;
    ElkWebDelegate *delegate_;
    IMPLEMENT_REFCOUNTING(ElkDomLinksVisitor);
};

class ElkDomDisplayTextVisitor : public CefDOMVisitor
{
public:
    ElkDomDisplayTextVisitor(const QString frame, ElkWebDelegate *delegate);
    ~ElkDomDisplayTextVisitor();

    virtual void Visit(CefRefPtr<CefDOMDocument> document) OVERRIDE;

private:
    QString frame_;
    ElkWebDelegate *delegate_;
    IMPLEMENT_REFCOUNTING(ElkDomDisplayTextVisitor);
};

#endif // ELK_DOM_VISITOR_H
